{ Statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=2991
  Verdict: Accepted
}
uses
	SysUtils, Math;
 
var   
	i,n,a,b,t:longint;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(n);
a:=1;
b:=1;
for i:=2 to n do begin
	t:=a;
	inc(a,b);
	b:=t;
end;
write(a+b);
end.